'use strict';
const dayjs = require("dayjs");
module.exports = app => {
    const { STRING, INTEGER, TINYINT } = app.Sequelize;
    return app.model.define(
      'staff',
      {
            id: {type: INTEGER, primaryKey: true, autoIncrement: true},
              company: INTEGER,
              username: STRING(20),
              sex: STRING(4),
            telephone: STRING(20),
            email: STRING(20),
            status: INTEGER,
            password: STRING(20),
            version: INTEGER,
            is_deleted: TINYINT(1),
          birthday: STRING(20),
      },
      {
          tableName: 'staff',
          timestamps: true, // 启用时间戳(createdAt, updatedAt)
          updatedAt: false, // 不想要 updatedAt
          createdAt: false, // 想要  createdAt 但是希望名称叫做 created_at
      }
  );
};
